import request from '@/utils/request'

// 查询边民合作社备案列表
export function listBtCooperativeRecord(query) {
  return request({
    url: '/bt/BtCooperativeRecord/list',
    method: 'get',
    params: query
  })
}

// 查询边民合作社备案详细
export function getBtCooperativeRecord(id) {
  return request({
    url: '/bt/BtCooperativeRecord/' + id,
    method: 'get'
  })
}

// 新增边民合作社备案
export function addBtCooperativeRecord(data) {
  return request({
    url: '/bt/BtCooperativeRecord',
    method: 'post',
    data: data
  })
}

// 修改边民合作社备案
export function updateBtCooperativeRecord(data) {
  return request({
    url: '/bt/BtCooperativeRecord',
    method: 'put',
    data: data
  })
}

// 边民合作社备案-变更申报
export function updateBtCooperativeDecl(params) {
  return request({
    url: '/bt/BtCooperativeRecord/modifyDecl',
    method: 'post',
    data: params
  })
}

// 删除边民合作社备案
export function delBtCooperativeRecord(id) {
  return request({
    url: '/bt/BtCooperativeRecord/' + id,
    method: 'delete'
  })
}

// 导出边民合作社备案
export function exportBtCooperativeRecord(query) {
  return request({
    url: '/bt/BtCooperativeRecord/export',
    method: 'get',
    params: query
  })
}

// 删除边民合作社备案
export function declBtCooperativeRecord(id) {
  return request({
    url: '/bt/BtCooperativeRecord/decl/' + id,
    method: 'post'
  })
}

// 审核边民合作社备案
export function auditBtCooperativeRecord(ids) {
  return request({
    url: '/bt/BtCooperativeRecord/audit/' + ids,
    method: 'post'
  })
}


//合作社批量同步二级市场
export function hzsBatchSyncToApp(ids) {
  return request({
    url: '/bt/BtCooperativeRecord/syncToApp/' + ids,
    method: 'post'
  })
}

//合作社批量同步
export function hzsBatchSync() {
  return request({
    url: '/bt/BtCooperativeRecord/syncData',
    method: 'get'
  })
}
